/**
 * desc: 资讯接口
 */

import request from '@/static/uitls/request.js'

// 资讯列表
const getTInfomationList = (info_cate_id,page,size) => {
	return request({
		url: '/teacher/v1/infomation/index',
		method: 'GET',
		data:{
			info_cate_id:info_cate_id,
			page:page,
			size:size
		}
	})
}

// 资讯详情
const getTInfomationDetail = id => {
	return request({
		url: '/teacher/v1/infomation/read?infomation_id='+id,
		method: 'GET'
	})
}

// 搜索资讯列表
const getTSearchList = data => {
	return request({
		url: '/teacher/v1/infomation/search',
		method: 'GET',
		data
	})
}



// 首页公告列表
const getTIndexNotice = () => {
	return request({
		url: '/teacher/v1/notice/new',
		method: 'GET'
	})
}


// 公告列表
const getTNoticeList = (page,size) => {
	return request({
		url: '/teacher/v1/notice/index',
		method: 'GET',
		data:{
			page:page,
			size:size
		}
	})
}
// 公告详情
const getTNoticeDetail = id => {
	return request({
		url: '/teacher/v1/notice/read?notice_id='+id,
		method: 'GET'
	})
}

module.exports = {
	getTInfomationList,
	getTInfomationDetail,
	getTSearchList,
	
	getTIndexNotice,
	getTNoticeList,
	getTNoticeDetail
}
